home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / arexx / ole1v10a.lha / OLE_System / rexx / intro.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-01-31  |  1.2 KB  |  64 lines

  1. /*
  2.  * intro.rexx
  3.  *
  4.  * USAGE: intro.rexx
  5.  *
  6.  * Really the first script of my poor presentation.
  7.  *
  8.  * $(C): (1994, Rocco Coluccelli, Bologna)
  9.  * $VER: intro.rexx 1.00 (08.Dec.1994)
  10.  */
  11.  
  12. ADDRESS COMMAND
  13.  
  14. MAXLINE = 80
  15.  
  16. s1 = "This is especially dedicated, to all people"
  17. s2 = "thinking that AMIGA needs special software,"
  18. s3 = "to become a multimedia machine."
  19. s4 = "I'm going to present you, the OLE System."
  20. s5 = "OLE stands for Objects, and Links Exchanged."
  21. CALL Print(s1 s2 s3,)
  22. ''SAY '-m -s150 -p80' s1 s2 s3
  23. CALL Print(s4 s5,)
  24. ''SAY '-m -s120 -p90' s4 s5
  25.  
  26. s1 = "I don't want to bother you with a long discussion about this package."
  27. s2 = "You will find all technical information on the documents,"
  28. s3 = "that author has already inserted inside."
  29. CALL Print(s1 s2 s3,)
  30. ''SAY '-m -s150 -p110' s1
  31. ''SAY '-m -s160 -p90' s2 s3
  32.  
  33. WAIT 1
  34.  
  35. EXIT 0
  36.  
  37.  
  38. /*
  39.  *    procedure to split text onto lines of MAXLINE characters length
  40.  */
  41. Print: PROCEDURE EXPOSE MAXLINE
  42.  
  43.     DO i = 1 TO ARG()
  44.  
  45.         line = ARG(i)
  46.         DO FOREVER
  47.  
  48.             IF LENGTH(line) <= MAXLINE THEN DO
  49.                 ECHO line
  50.                 LEAVE
  51.                 END
  52.  
  53.             pos = MAX(LASTPOS(' ',line,MAXLINE),POS(' ',line))
  54.             IF pos = 0 THEN DO
  55.                 ECHO line
  56.                 LEAVE
  57.                 END
  58.  
  59.             ECHO LEFT(line,pos); line = SUBSTR(line,pos + 1)
  60.         END
  61.     END
  62.  
  63. RETURN
  64.